//
//  OKLOLModel.m
//  ZLFastDoctor
//
//  Created by answer on 16/5/27.
//  Copyright © 2016年 LS. All rights reserved.
//

#import "OKLOLModel.h"
#import <AFNetworking.h>
#import <YYModel/YYModel.h>

@implementation OKLOLModel

+ (void)requestLOLcompletion:(void(^)(NSArray *))completion {
    
    [[AFHTTPSessionManager manager] GET:@"http://www.quanmin.tv/json/categories/lol/list.json?0527162031" parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        
        NSArray *data = responseObject[@"data"];
        NSArray *result = [NSArray yy_modelArrayWithClass:self json:data];
        completion(result);
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        
    }];
    
}

@end
